package com.iot08.api.controller;

import com.iot08.api.controller.base.BaseController;
import com.iot08.api.service.BrokenScreenInsuranceService;
import com.iot08.api.vo.request.base.BaseAccountReqVO;
import com.iot08.common.utils.response.ResponseMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author cwj
 * @description
 * @date 2025/4/16 15:28
 **/
@RestController
@RequestMapping("getway/brokenScreenInsurance")
public class BrokenScreenInsuranceController extends BaseController {

    @Resource
    private BrokenScreenInsuranceService brokenScreenInsuranceService;

    /**
     * @description 查询用户的碎屏险
     * @author cwj
     * @param [vo]
     * @return com.iot08.common.utils.response.ResponseMap
     * @date @time 2025/4/16 15:33
     **/
    @GetMapping("/query")
    public ResponseMap queryBrokenScreenInsuranceInfo(@Validated BaseAccountReqVO vo) {
        return brokenScreenInsuranceService.queryBrokenScreenInsuranceInfo(vo.getOpenid());
    }
}
